package com.cavas.domain.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cavas.domain.bean.Retard;
import com.cavas.domain.dao.DaoRetard;

@Service
@Transactional
public class ServiceRetardImpl implements ServiceRetard{
	
	@Autowired
	DaoRetard daoRetard;

	public void setDaoRetard(DaoRetard daoretard){
		this.daoRetard = daoretard;
	}
	
	@Override
	public void addRetard(Retard rt, int id_membre) {
		daoRetard.addRetard(rt, id_membre);
	}

	@Override
	public List<Retard> allRetard() {
		return daoRetard.allRetard();
	}

	@Override
	public List<Retard> getRetardMembre(String mail) {
		return daoRetard.getRetardMembre(mail);
	}

	@Override
	public void deleteRetard(int id) {
		daoRetard.deleteRetard(id);
		
	}

	@Override
	public int TotalRetard() {
		return daoRetard.TotalRetard();
	}

}
